#include "dev.h"

static void mydev_release(struct device *dev)
{
    printk("mydev release\r\n");
}

static struct device mydev = 
{
    .init_name = "mydev",
    .bus = &mybus,
    .release = mydev_release,
};


static int __init dev_init(void)
{
    //注册设备
    return device_register(&mydev);
}

static void __exit dev_exit(void)
{
    //注销设备
    device_unregister(&mydev);
}

module_init(dev_init);
module_exit(dev_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("lf");
MODULE_DESCRIPTION("This module is mydev");
MODULE_ALIAS("mydev");

